package com.zs.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.system.common.mapper.BisCouponActiveMapper;
import com.system.common.mapper.BisCouponRecordMapper;
import com.system.common.pojo.BisCouponActive;
import com.system.common.pojo.BisCouponRecord;

@Service
public class BisCouponActiveServiceImpl implements BisCouponActiveService{
	
	@Autowired
	private BisCouponActiveMapper bisCouponActiveMapper;
	@Autowired
	private BisCouponRecordMapper bisCouponRecordMapper;

	@Override
	public List<Map<Object,Object>> queryBisCouponActive(Map<String, Object> map) {
		List<Map<Object,Object>> activeList=bisCouponActiveMapper.queryBisCouponActive(map);
		return activeList;
	}

	@Override
	public void savaActive(BisCouponActive bisCouponActive) {
		 bisCouponActiveMapper.insertSelective(bisCouponActive);
	}

	@Override
	public void editActive(BisCouponActive bisCouponActive) {
		bisCouponActiveMapper.updateByPrimaryKeySelective(bisCouponActive);
	}

	@Override
	public List<BisCouponRecord> queryByActiveId(Map<String, Object> map) {
		List<BisCouponRecord> RecordList=bisCouponRecordMapper.queryByActiveId(map);
		return RecordList;
	}

	@Override
	public BisCouponRecord savaRecord(BisCouponRecord bisCouponRecord) {
		bisCouponRecordMapper.insertSelective(bisCouponRecord);
		return null;
	}

	@Override
	public void editByRecord(BisCouponRecord bisCouponRecord) {
		 bisCouponRecordMapper.editByRecord(bisCouponRecord);
	}

	@Override
	public List<Map<String, Object>> queryByTime() {
		return bisCouponActiveMapper.queryByTime();
	}

	
}
